package cn.liontalk.concurrent.shuati;


import java.util.Scanner;

/**
 * 图片整理
 */

public class Main6 {

    //有一只兔子，从出生后第3个月起每个月都生一只兔子，小兔子长到第三个月后每个月又生一只兔子，假如兔子都不死，问每个月的兔子总数为多少？
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            int num = sc.nextInt();
            System.out.println(get_total_count1(num));
        }
    }


    public static int get_total_count1(int month) {
        assert (month >= 1);
        if (month == 1 || month == 2)
            return 1;
        return get_total_count1(month - 1) + get_total_count1(month - 2);

    }
}
